home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / include / kb_def.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-03  |  7.6 KB  |  249 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                Header file for keyboard definitions.
  4. *
  5. *  Version 2.0, 27-Feb-92, ST Systems (STX)
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  24-Jan-91, D Grogan/H Leckner       Original version (for CDF V2.0).
  10. *   V1.1  25-Jun-91, H Leckner           Fix for Iris console and
  11. *                       'kb_def_user.h' included.
  12. *   V1.2  15-Oct-91, H Leckner           Changed for IBM-RS6000 (AIX) port.
  13. *   V2.0  27-Feb-92, H Leckner           IBM PC port.  CDF V2.2.
  14. *
  15. ******************************************************************************/
  16.  
  17. /*  
  18.  *  Definition of numeric values for keyboard scan codes.
  19.  *  Only special keys are assigned.
  20.  *  All numeric codes are decimal.
  21.  */
  22.  /*  NULL is predefined as 0 */
  23.  
  24. #define KB_CTRL_A         1
  25. #define KB_CTRL_B         2
  26. #define KB_CTRL_D         4
  27. #define KB_CTRL_E         5
  28. #define KB_CTRL_F         6
  29. #define KB_BELL           7
  30. #define KB_CTRL_H         8
  31. #define KB_BACKSPACE      KB_CTRL_H
  32. #define KB_BACKFIELD      KB_CTRL_B
  33. #
  34. #define KB_HORIZTAB       9
  35. #define KB_LINEFEED      10
  36. #define KB_CTRL_K     11
  37. #define KB_CTRL_L        12  /* same as formfeed */
  38. #define KB_FORMFEED      12
  39.  
  40.  
  41. #define KB_CTRL_M        13
  42. #define KB_CTRL_N        14
  43. #define KB_CTRL_O        15
  44. #define KB_CTRL_P        16
  45. #if defined(__MSDOS__)
  46. #define KB_CTRL_V        22
  47. #define KB_CTRL_X        24
  48. #else
  49. #define KB_CTRL_X        21
  50. #endif
  51. #define KB_CTRL_Z        26
  52.  
  53. #define KB_ESCAPE        27
  54. #define KB_REDRAW        23      /*   control-W  */
  55.  
  56. #define KB_CONTEXT_HELP  KB_HORIZTAB       /*   control-I */
  57.  
  58. #define KB_SPACE         32
  59. #define KB_PAGEUP        85   /* UPCASE   U */
  60. #define KB_pageup        117  /* lowcase  u */
  61. #define KB_PAGEDOWN      68   /* UPCASE   D */
  62. #define KB_pagedown      100  /* lowcase  d */
  63.  /*                                   (not sure about 45 and 95)
  64.   *         33 thru 47 are characters !"#$%&'()*+,-./
  65.   *         48 thru 57 are            0123456789
  66.   *         58 thru 64 are            :;<=>?@
  67.   *         65 thru 90 are            A..Z
  68.   *         91 thru 96 are            [\]^-`
  69.   *         97 thru 122 are           a..z
  70.   *        123 thru 126 are           {|}~
  71.   */
  72. #if defined (AIX)
  73. #define KB_DELETE       1930
  74. #else
  75. #if defined (__MSDOS__)
  76. #define KB_DELETE KB_CTRL_H
  77. #define KB_DEL_AND_STAY 330
  78. #else
  79. #define KB_DELETE  127
  80. /*
  81. #else
  82. Delete key for the IRIS console if needed later
  83. #if defined (sgi)
  84. #define KB_DELETE  330
  85. #endif
  86. */
  87. #endif
  88. #endif
  89.  
  90. #ifdef vms
  91. #      define KB_RETURN        13
  92. #      define KB_UPARROW      274
  93. #      define KB_DOWNARROW    275
  94. #      define KB_LEFTARROW    276
  95. #      define KB_RIGHTARROW   277
  96. #      define KB_PF1          256
  97. #      define KB_PF2          257
  98. #      define KB_PF3          258
  99. #      define KB_PF4          259
  100. #      define KB_PAD0         260
  101. #      define KB_PAD1         261
  102. #      define KB_PAD2         262
  103. #      define KB_PAD3         263
  104. #      define KB_PAD4         264
  105. #      define KB_PAD5         265
  106. #      define KB_PAD6         266
  107. #      define KB_PAD7         267
  108. #      define KB_PAD8         268
  109. #      define KB_PAD9         269
  110. #      define KB_PAD_ENTER    270
  111. #      define KB_PAD_MINUS    271
  112. #      define KB_PAD_COMMA    272
  113. #      define KB_PAD_DOT      273
  114. #      define KB_PREVSCRN     315
  115. #      define KB_NEXTSCRN     316
  116. #endif
  117.  
  118. #if defined(unix) | defined(ultrix)
  119. #      define KB_RETURN        10
  120. #      define KB_UPARROW      KEY_UP
  121. #      define KB_DOWNARROW    KEY_DOWN
  122. #      define KB_LEFTARROW    KEY_LEFT
  123. #      define KB_RIGHTARROW   KEY_RIGHT
  124. #      define KB_PF1          265
  125. #      define KB_PF2          266
  126. #      define KB_PF3          267
  127. #      define KB_PF4          268
  128. #      define KB_PAD0         351
  129. #      define KB_PAD1         348
  130. #      define KB_PAD2         350
  131. #      define KB_PAD3         349
  132. #      define KB_PAD4         269
  133. #      define KB_PAD5         270
  134. #      define KB_PAD6         271
  135. #      define KB_PAD7         273
  136. #      define KB_PAD8         274
  137. #      define KB_PAD9         264
  138. #      define KB_PAD_MINUS    271
  139. #      define KB_PAD_ENTER    343
  140. #      define KB_PAD_COMMA    272
  141. #      define KB_PAD_DOT      352
  142. #      define KB_PREVSCRN     315
  143. #      define KB_NEXTSCRN     316
  144. #endif
  145. #if defined(__MSDOS__)
  146. #      define KB_RETURN        10
  147. #      define KB_UPARROW      259
  148. #      define KB_DOWNARROW    258
  149. #      define KB_LEFTARROW    260
  150. #      define KB_RIGHTARROW   261
  151. #      define KB_PF1          265
  152. #      define KB_PF2          266
  153. #      define KB_PF3          267
  154. #      define KB_PF4          268
  155. #      define KB_PAD0         351
  156. #      define KB_PAD1         348
  157. #      define KB_PAD2         350
  158. #      define KB_PAD3         349
  159. #      define KB_PAD4         269
  160. #      define KB_PAD5         270
  161. #      define KB_PAD6         271
  162. #      define KB_PAD7         273
  163. #      define KB_PAD8         274
  164. #      define KB_PAD9         264
  165. #      define KB_PAD_MINUS    271
  166. #      define KB_PAD_ENTER    343
  167. #      define KB_PAD_COMMA    272
  168. #      define KB_PAD_DOT      352
  169. #      define KB_PREVSCRN     315
  170. #      define KB_NEXTSCRN     316
  171. #endif
  172.  
  173.  /*
  174.   *     Arbitrarily-coded signal series used by WFL and UTILITY.
  175.   *     The series uses only values less than zero to prevent
  176.   *     conflicts with real scan codes from the keyboard.
  177.   *     Values less than -128 should be used for error and warning
  178.   *     signals.
  179.   */
  180.  
  181. #define ALPHA                  -1
  182. #define NUMERIC                -2
  183. #define SPECIAL                -3
  184. #define SPACECHAR              -4
  185. #define DELETECHAR             -5
  186. #define    PAGE               -6
  187. #define    COPY                   -7
  188. #if defined(__MSDOS__)
  189. #define    DELSTAY                   -8
  190. #endif
  191. #define    REDRAW                 KB_REDRAW
  192.  
  193. #define ERROR                -128
  194.  
  195. /******************************************************************************
  196. * Contents of 'kb_def_user.h' starts here.
  197. ******************************************************************************/
  198.  /*
  199.   *   Keyboard definitions assigned by user.   (Flawed thinking here, redo!!!)
  200.   *   The KBM_ series are designated for operating in Menus;
  201.   *   the KBF_ series are designated for Forms.
  202.   */
  203.  
  204.   /*    Menu set   */
  205.  
  206. #define KBM_UP               KB_UPARROW
  207. #define KBM_DOWN             KB_DOWNARROW
  208. #define KBM_LEFT             KB_LEFTARROW
  209. #define KBM_RIGHT            KB_RIGHTARROW
  210. #define KBM_BACK             KB_BACKSPACE
  211. #define KBM_SELECT           KB_RETURN
  212. #define KBM_ENTER         KB_PAD_ENTER
  213.  
  214. #define KBM_QUIT             KB_CTRL_E
  215. #define KBM_EXIT             KB_CTRL_K
  216. #define KBM_PREVSCRN         KB_PAGEUP
  217. #define KBM_NEXTSCRN         KB_PAGEDOWN
  218. #define KBM_prevscrn         KB_pageup
  219. #define KBM_nextscrn         KB_pagedown
  220. #define KBM_HELP             KB_CTRL_L
  221. #define KBM_POPUP         KB_CTRL_P
  222. #define KBM_ACTION         KB_CTRL_F
  223.   /*    Form set   */
  224.  
  225. #define KBF_QUIT         KB_CTRL_E
  226. #define KBF_TOGGLE_INSERT    KB_CTRL_A
  227. #define KBF_DEL_TO_SOL       KB_CTRL_X   /* delete to start of line */
  228. #define KBF_DEL_TO_EOL       KB_CTRL_D   /* delete to end of line */
  229.  
  230. /* #define KBF_MOVE_SOL         KB_CTRL_B */
  231. #define KBF_MOVE_SOL_ALT     KB_PAD8
  232.  
  233. #define KBF_MOVE_EOL         KB_CTRL_N
  234. #define KBF_MOVE_EOL_ALT     KB_PAD9
  235.  
  236. #define KBF_UP               KB_UPARROW
  237. #define KBF_DOWN             KB_DOWNARROW
  238. #define KBF_LEFT             KB_LEFTARROW
  239. #define KBF_RIGHT            KB_RIGHTARROW
  240. #define KBF_EXIT             KB_CTRL_K
  241. #define KBF_HELP             KB_CTRL_L
  242. #define KBF_NEXTFIELD        KB_RETURN
  243. #define KBF_SELECT           KB_RETURN
  244. #define KBF_PREVFIELD        KB_BACKFIELD
  245. #define KBF_POPUP         KB_CTRL_P
  246. #define KBF_ACTION         KB_CTRL_F
  247. #define KBF_ENTER            KB_PAD_ENTER
  248. #define KBF_BACKSPACE         KB_BACKSPACE
  249.